<template>
  <div class="guid w15 item fl" style="margin: 0;">
    <a href="javascript: void(0)" @click="$router.push('/dashboardUser')" :class="{'on': routeList.indexOf($route.path)>-1}" class="ftz16"><img src="../assets/res/img/icon_use_circle.png" class="icon">
      <span>我的圈子</span>
    </a>
    <!-- <a href="javascript: void(0)" class="ftz16"><img src="../assets/res/img/icon_use_priv.png" class="icon">
      <span>我的特权</span>
    </a> -->
    <a href="javascript: void(0)" class="ftz16"
      @click="$router.push('/myorder')"
      :class="{'on': /myorder/.test($route.path)}">
      <img src="../assets/res/img/icon_use_ord.png" class="icon">
      <span>我的订单</span>
    </a>
    <a href="javascript: void(0)" class="ftz16" @click="$router.push('/myReward')" :class="{'on': /myReward/.test($route.path)}"><img src="../assets/res/img/icon_use_reward.png" class="icon">
      <span>我的打赏</span>
    </a>
    <a href="javascript: void(0)" class="ftz16"
      @click="$router.push('/mycollect')"
      :class="{'on': /mycollect/.test($route.path)}">
      <img src="../assets/res/img/icon_use_coll.png" class="icon">
      <span>我的收藏</span>
    </a>
    <a href="javascript: void(0)" class="ftz16"
      @click="$router.push('/myasset')"
      :class="{'on': /myasset/.test($route.path)}">
      <img src="../assets/res/img/icon_use_asset.png" class="icon">
      <span>我的资产</span>
    </a>
    <a href="javascript: void(0)" class="ftz16" @click="$router.push('/setting')" :class="{'on': $route.path === '/setting'}"><img src="../assets/res/img/icon_data.png" class="icon">
      <span>资料设置</span>
    </a>
    <!-- <router-link tag="a" to="/evaluating" target="_blank" class="ftz16" title="风险评测">
      <img src="../assets/res/img/icon_use_eva.png" class="icon">
      <span>风险评测</span>
    </router-link> -->
    <a href="javascript: void(0)" class="ftz16" @click="$router.push('/dashboardUser/feedback')"
      :class="{'on': /feedback/.test($route.path)}"><img src="../assets/res/img/icon_feed.png" class="icon">
      <span>意见反馈</span>
    </a>
    </div>
</template>
<script>
// import Routes from '@/router'
// import * as api from '@/service/api'
import { mapState } from 'vuex'
export default {
  data () {
    return {
      routeList: ['/dashboardUser/live', '/dashboardUser/qa', '/dashboardUser/viewpoint/', '/dashboardUser/plan/']
    }
  },
  computed: {
    ...mapState({
      collectList: state => state.me.collectList
    }),
    activeMenu () {
      return this.$route.path
    },
    userId () {
      return this.$store.state.me.user.userId
    },
    curRoute () {
      return this.$route.name
    }
  },
  created () {
    // this.curRoute = this.$route.name
  },
  methods: {
    // async removeSiteStar (item) {
    //   try {
    //     await api.removeSiteStar({
    //       siteId: item.siteId
    //     })
    //     this.$store.dispatch('getUserInfo')
    //   } catch (e) {
    //     console.log(e)
    //   }
    // },
    // async modifyUserFoot (item) {
    //   try {
    //     await api.modifyUserFoot({
    //       userId: this.userId,
    //       siteUrl: item.ipAdd + ':' + item.ipPort,
    //       siteName: item.siteName,
    //       siteLogo: item.siteLogo
    //     })
    //     window.open(item.ipAdd + ':' + item.ipPort)
    //   } catch (e) {
    //     console.log(e)
    //   }
    // },
    linkToSite (item) {
      window.open(item.ipAdd + ':' + item.ipPort)
    },
    handleOpen (key, keyPath) {
      // console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      // console.log(key, keyPath)
    }
  }
}
</script>
